package com.xysl.service.impl;

import com.xysl.api.domain.XyslMenu;
import com.xysl.api.domain.XyslUser;
import com.xysl.domain.dto.XyslMenuDTO;
import com.xysl.mapper.XyslUserMapper;
import com.xysl.service.IXyslUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户Service业务层处理
 *
 * @author xysl
 * @date 2024-12-27
 */
@Service
public class XyslUserServiceImpl implements IXyslUserService
{
    @Resource
    private XyslUserMapper xyslUserMapper;

    /**
     * 查询用户
     *
     * @param id 用户主键
     * @return 用户
     */
    @Override
    public XyslUser selectXyslUserById(Long id)
    {
        return xyslUserMapper.selectXyslUserById(id);
    }

    /**
     * 查询用户
     * @param account 登录账号
     * @return 用户
     */
    @Override
    public XyslUser queryXyslUserByAccount(String account)
    {
        return xyslUserMapper.queryXyslUserByAccount(account);
    }

    @Override
    public List<XyslMenu> queryLoginUserMenuList(XyslMenuDTO menuDTO) {
        return xyslUserMapper.queryLoginUserMenuList(menuDTO);
    }
}
